package com.tujia.controller;

import com.tujia.ProblemType;
import com.tujia.service.ProblemTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: feiwang_6
 * @create: 2019/3/1 19:00
 * @description:
 */
@Controller
@RequestMapping("/swagger")
@Api(description = "问题类型")
public class TestSwaggerController {
    
    @Autowired
    private ProblemTypeService problemTypeService;
    
    @ApiOperation(value = "查询问题类型", notes="描述信息", httpMethod = "POST")
    @RequestMapping(value = "/queryProblemTypeById")
    @ResponseBody
    public ProblemType queryProblemTypeById(Integer id) throws Exception {
        System.out.println(id);
        ProblemType problem = problemTypeService.getProblemTypeById(id);
        return problem;
    }
}
